<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>test</title>	
	</head>
	<body>
		<ul>
			<li><a href="#demo">JS小demo</a></li>
		</ul>
		
		<p id="demo">变身！！！</p>
		<script>
			function myfunction(){
				x=document.getElementById("demo");/*找到元素*/
				x.innerHTML="hello JavaScript!";/*改变内容*/
			}
		</script>
		<button type="button" onclick="myfunction()">点击这里</button>
	</body>
</html>
